package com.example.module_filemanage.Utils;

import android.databinding.BindingAdapter;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.example.module_filemanage.R;

import java.util.UUID;

/**
 * Created by SJ on 2018/4/20.
 */

public class ImageHelper {
    @BindingAdapter({"imageUrl"})
    public static void load(ImageView iv, String url) {
        Glide.with(iv.getContext()).load(url+"?v="+UUID.randomUUID().toString().replace("-",""))
                .error(R.drawable.ic_broken_image_black_24dp)
               .into(iv);
    }
}
